<extend name="Layout:layout_content" />

<block name="body_main">
    <div class="grid-parent xsui-page-header">
        <div class="grid-60 mobile-grid-100 grid-parent">
            <a href="{:U('order_add')}" class="xsui-btn ui-state-default xsui-lnk-add-dialog" title="新增订单"><i class="fa fa-plus"></i>新增订单</a>
            <a href="{:U('order_delete','id=varkey')}" class="xsui-btn ui-state-default xsui-lnk-remove-multi"><i class="fa fa-remove"></i>批量删除</a>
        </div>
        <div class="grid-40 mobile-grid-100 grid-parent xsui-text-right">
            <a href="#" class="xsui-btn ui-state-default lnk-refresh"><i class="fa fa-refresh"></i>刷新</a>
            <span class="xsui-input-group"><form method="get"><input type="text" name="search_key" value="{$search.search_key}" placeholder="用户名/姓名/手机号码" /><button type="submit" class="ui-state-default"><i class="fa fa-search"></i>搜索</button><button id="btn-search-dialog" class="ui-state-default xsui-icon-only" title="高级搜索"><i class="fa fa-gear"></i></button></form></span>
        </div>
        <div id="search-dialog" class="xsui-hidden">
            <form method="get" class="xsui-form">
                编号：<input type="text" name="sn" placeholder="订单编号" value="{$search.sn}" />
                姓名：<input type="text" name="name" placeholder="客户姓名" value="{$search.name}" style="width:60px;" />
                电话：<input type="text" name="tel" placeholder="客户电话" value="{$search.tel}" style="width:60px;" />
                工号：<input type="text" name="sellerUserName" placeholder="工号" value="{$search.sellerUserName}" style="width:45px;" />
                订单金额(元)：<input type="text" name="orderAmountMin" value="{$search.orderAmountMin}" style="width:45px;" /> 至 <input type="text" name="orderAmountMax" value="{$search.orderAmountMax}" style="width:45px;" />
                <button type="submit">搜索</button>
            </form>
        </div>
    </div>
    <div id="grid-container">
        {$content}
    </div>
</block>
<block name="body_after"> 
    $('.search-panel .lnk-submit').click(function () {
    var $frm = $('.search-panel form');
    $frm.find('input[name="action"]').val($(this).text() == '导出' ? 'export' : 'display');
    $frm.submit();
    })
</block>